package com.oceansoft.mobile.biz.admin.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * 商家实体
 * @author Administrator
 *
 */
public class Merchant {
	private long sid;
	private String company_name;
	private String contact;
	private String tel;
	private String description;
	private String address;
	private int status;
	
	private String logo;
	private int themeId;
	
	
	 public static RowMapper<Merchant> getFullMapp() {
	        return new RowMapper<Merchant>() {
	            @Override
	            public Merchant mapRow(ResultSet rs, int rowNum) throws SQLException {
	            	Merchant obj = new Merchant();
	                obj.setSid(rs.getLong("sid"));
	                obj.setCompany_name(rs.getString("company_name"));
	                obj.setContact(rs.getString("contact"));
	                obj.setTel(rs.getString("tel"));
	                obj.setDescription(rs.getString("description"));
	                obj.setStatus(rs.getInt("status"));
	                obj.setLogo(rs.getString("logo"));
	                obj.setThemeId(rs.getInt("themeId"));
	                obj.setAddress(rs.getString("address"));
	                return obj;
	            }
	        };
	    }
	 public static RowMapper<Merchant> getMapp() {
		 return new RowMapper<Merchant>() {
			 @Override
			 public Merchant mapRow(ResultSet rs, int rowNum) throws SQLException {
				 Merchant obj = new Merchant();
				 obj.setSid(rs.getLong("sid"));
				 obj.setCompany_name(rs.getString("company_name"));
				 obj.setContact(rs.getString("contact"));
				 obj.setTel(rs.getString("tel"));
				 obj.setDescription(rs.getString("description"));
				 obj.setStatus(rs.getInt("status"));
				 obj.setLogo(rs.getString("logo"));
				 obj.setAddress(rs.getString("address"));
				 return obj;
			 }
		 };
	 }
	
	
	public Merchant() {
		super();
	}

	public Merchant(long sid, String company_name) {
		super();
		this.sid = sid;
		this.company_name = company_name;
	}
	public Merchant(long sid, String company_name, String contact, String tel,
			String description, int status) {
		super();
		this.sid = sid;
		this.company_name = company_name;
		this.contact = contact;
		this.tel = tel;
		this.description = description;
		this.status = status;
	}


	public int getThemeId() {
		return themeId;
	}


	public void setThemeId(int themeId) {
		this.themeId = themeId;
	}


	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}


	public String getLogo() {
		return logo;
	}


	public void setLogo(String logo) {
		this.logo = logo;
	}


	public long getSid() {
		return sid;
	}
	public void setSid(long sid) {
		this.sid = sid;
	}

	public String getCompany_name() {
		return company_name;
	}
	public void setCompany_name(String company_name) {
		this.company_name = company_name;
	}
	public String getContact() {
		return contact;
	}
	public void setContact(String contact) {
		this.contact = contact;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	
	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}


	

}
